<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>


    <style>
        a {
            background: url("../img/home.jpg") no-repeat center 10px;
            display: inline-block;
            border: 1px solid red;
            height: 70px;
            line-height: 110px;
        }
    </style>


        <a href="#" class="db">首页</a>
        <a href="#" class="db">首页</a>
        <a href="#" class="db">首页</a>


        
        <pre>
            <h2>
    用 img 为背景图片
    实现文字图片对齐:
    a {
        background: url(img/home.jpg) no-repeat center 10px;
        display: inline-block;
        border: 1px solid red;
        height: 70px;
        line-height: 110px;
    }

            </h2>
        </pre>

</body>

</html>